//
// File Name  :   aptra-theme.less
// =============================================================================
// Copyright 2012 NCR Corporation
// =============================================================================
// All revision information is updated automatically from source code control
// change records - please do not manually edit.
// =============================================================================
//
// =============================================================================
//  $LastChangedRevision::                                          $
//  $LastChangedBy::                                                $
//  $LastChangedDate::                                              $
// =============================================================================
//

// Table of Contents
// -----------------------------------------------------------------------------
// 1. Constants -> Defines variables contain constant values used throughout
//                 the stylesheet.
// 2. Mixins -> Theme specific LESS mixins.
// 3. Global -> Styles applied to standard HTML elements.
// 4. Generic Class -> Reusable css classes.
// 5. Dashboard -> Styles for dashboard itself.

//------------------------------------------------------------------------------
//
// Constants
//
//------------------------------------------------------------------------------

//Base colors
@color-theme: #1D6F35;
@color-base: #E6E6E6;
@color-off: #CCCCCC;
@color-mid: #666666;
@color-mid-light: #9A9A9A;
@color-light: #EFEFEF;

//Gradients
@color-nav-top: #29984C;
@color-nav-bottom: #1D6F35;
@color-toolbar-top: #FFFFFF;
@color-toolbar-bottom: #CCCCCC;

//Fonts
@theme-default-fonts: "Helvetica", "Arial", sans-serif;
@theme-heading-fonts: "Trebuchet MS", @theme-default-fonts;

//Sizing
@app-min-width: 940px;
@theme-font-size: 12px;
@border-radius: 4px;
@button-top-stop: 20%;
@button-bottom-stop: 95%;
@control-margin: 10px;

//Fluid Grid settings
@grid-columns: 12;
@fluid-grid-column-width: 6.958333333%;
@fluid-grid-gutter-width: 1.5%;

//Sprite map settings
@icon-start-y: 448px;

//------------------------------------------------------------------------------
//
// Mixins
//
//------------------------------------------------------------------------------

@import "../mixins.less";
@import "../grid.less";

.aptra {
    //Defines reusable button styles that can be applied to other block elements
    //as well such as 'li'.
    .button {
        border: 1px solid @color-mid;
        background-color: #B3B3B3;

        .mixins > .vertical-gradient(#FBFBFB, @button-top-stop, #B3B3B3, @button-bottom-stop);
        .mixins > .border-radius;

        &:hover {
            background-color: #D7D7D7;

            .mixins > .vertical-gradient(#FDFDFD, @button-top-stop, #D7D7D7, @button-bottom-stop);
        }

        &:active {
            background-color: #F8F8F8;

            .mixins > .vertical-gradient(#B0B0B0, @button-top-stop, #F8F8F8, @button-bottom-stop);
        }

        &[disabled], &[disabled]:hover, &[disabled]:active {
             color: #BCBCBC;
             border-color: #BCBCBC;
             background-color: #CCCCCC;

             .mixins > .vertical-gradient(#EDEDED, @button-top-stop, #CCCCCC, @button-bottom-stop);
        }
    }

    .panel-background {
        .mixins > .vertical-gradient(#FFFFFF, 50%, #F1F1F1, 85%);
    }

    .nav-title {
        color: white;
        font-size: 1.35em;
        font-weight: bold;
        font-family: @theme-heading-fonts;
    }
}

//------------------------------------------------------------------------------
//
// Global
//
//------------------------------------------------------------------------------

//------------------------------
// Root elements
//------------------------------

* {
    margin: 0;
    padding: 0;
}

html {
    font-family: @theme-default-fonts;
    font-size: @theme-font-size;
    background-color: white;
    color: black;
}

body {
    width: 100%;
    min-width: @app-min-width;
}

//------------------------------
// Text
//------------------------------

h1, h2, h3, h4, h5, h5 {
    font-family: @theme-heading-fonts;
    font-weight: bold;
    margin-bottom: 1em;
}

h1 {
    font-size: 1.35em;
}

p {
    padding-bottom: 1em;
}

//------------------------------
// Forms
//------------------------------

input {
    font-family: @theme-default-fonts;
    font-size: 1em;
    margin-bottom: 1em;
    padding: 0.35em;
    border: 1px solid #BCBCBC;
}

::-webkit-input-placeholder {
   font-style: italic;
}

:-moz-placeholder {
   font-style: italic;
}

select {
    margin-bottom: 1em;
}

label {
    font-weight: bold;
    display: block;
    padding-bottom: 0.35em;
}

button {
    font-size: 1em;
    font-family: @theme-default-fonts;
    padding: 0.35em 1.1em 0.35em 1.1em;
    outline: none;

    //IE-7 fixes for it to display correct padding
    width: auto;
    overflow: visible;

    .aptra > .button;
    .mixins > .box-shadow(0, 1px, 2px, rgba(0, 0, 0, 0.35));
}

//------------------------------
// Theme specific elements
//------------------------------

//Used for icons and sprites
i {
    .mixins > .inline-block;
}

//------------------------------------------------------------------------------
//
// Generic Classes
//
//------------------------------------------------------------------------------

.hidden {
    display: none;
    visibility: hidden;
}

.standalone {
    margin: @control-margin;
}

//------------------------------------------------------------------------------
//
// Dashboard classes
//
//------------------------------------------------------------------------------

//------------------------------
// Dashboard - Login View
//------------------------------

@logo-width: 424px;
@logo-height: 344px;
.login-view {
    padding-bottom: 4em;
    
    .aptra > .panel-background();    
    
    .login-logo {
        width: @logo-width;
        height: @logo-height;
        margin: 85px auto 0 auto;
        background: url(sprites.png) 0 -@header-height no-repeat;

        h1 {
            font-family: "Verdana", @theme-default-fonts;
            font-size: 2em;
            text-align: center;
            padding-top: 30px;
            color: #95A0A9;
            text-shadow: 0 2px 3px #EFEFEF;
        }
    }

    .login-panel {
        width: 250px;
        height: 175px;
        margin: 100px auto 0 auto;
        padding: 2em;
        border: 1px solid #BCBCBC;
        background-color: white;

        input {
            width: 94%;
            padding: 0.5em;
        }

        button {
            float: left;
        }

        .dashboardcore-Spinner {
            float: left;
            margin-left: 6px;
        }
    }
}

//------------------------------
// Dashboard - Dashboard View
//------------------------------

@header-height: 95px;
.dashboard-view {
    width: 100%;
    position: relative;

    @left-right-margin: 24px;
    @row-margin-bottom: 1.25em;

    .row {
        margin-bottom: @row-margin-bottom;
    }

    //------------------------------
    // Header
    //------------------------------

    @divider-color: #005721;
    .header {
        position: relative;
        width: 100%;
        height: @header-height;
        background: @color-theme url(sprites.png) top left no-repeat;
        color: white;
        border-bottom: 1px solid @divider-color;
        text-align: right;

        .mixins > .clear;

        a {
            color: white;
        }

        button {
            margin: 0 24px 0 16px;
        }

        span {
            line-height: @header-height;
        }

        .product-name {
            font-size: 1.7em;
            font-family: "Verdana", @theme-default-fonts;
            font-weight: bold;
            float: left;
            margin-left: 135px;
            padding: 0;
        }
    }

    //------------------------------
    // Tab Bars
    //------------------------------

    @tab-height: 35px;
    .feature-tabbar, .page-tabbar {
        width: 100%;
        height: @tab-height;

        *:first-child {
            margin-left: @left-right-margin - @control-margin;
        }  
        
        li {
            .mixins > .inline-block;
            .mixins > .user-select(none);
            vertical-align: middle;
        }

        .tab {
            height: @tab-height - 3px;
            line-height: @tab-height - 3px;
            margin-top: 2px;
            padding: 0 @control-margin;
            cursor: default;

            .mixins > .border-radius(@border-radius, @border-radius, 0, 0);
        }

        .selected, .selected:hover {
            border: 1px solid white;
        }
    }

    .feature-tabbar {
        border-top: 1px solid #47BF5C;
        border-bottom: 1px solid @divider-color;

        .mixins > .vertical-gradient(@color-nav-top, 10%, @color-nav-bottom, 90%);

        .tab {
            .aptra > .nav-title;
        }

        .tab:hover {
            border-bottom: 1px solid @divider-color;
            .mixins > .vertical-gradient(#57C963, 10%, #1E7039, 40%);
        }

        .selected, .selected:hover {
            color: @color-theme;
            border-bottom: 1px solid white;
            .mixins > .vertical-gradient(#B4DCB8, 10%, white, 40%);
        }

        .divider {
            .mixins > .vdivider(1px, @tab-height - 3px, 4px, @divider-color, #47BF5C);
        }
    }

    .page-tabbar {
        border-top: 1px solid white;
        border-bottom: 1px solid @color-mid;

        .mixins > .vertical-gradient(#E3E3E3, 10%, #B5B4B5, 90%);

        .tab {
            color: @color-mid;
            font-weight: bold;
            font-size: 0.95em;
        }

        .tab:hover {
            border-bottom: 1px solid @color-mid;
            .mixins > .vertical-gradient(white, 30%, #B5B4B5, 90%);
        }

        .selected, .selected:hover {
            color: @color-theme;
            border-bottom: 1px solid white;
            .mixins > .vertical-gradient(#DEDEDE, 10%, white, 40%);
        }

        .divider {
            .mixins > .vdivider(1px, @tab-height - 3px, 4px, @color-mid-light, @color-light);
        }
    }

    //------------------------------
    // Toolbars
    //------------------------------

    .view-filter-button {
        @button-height: 34px;
        height: @button-height;
        margin-left: @left-right-margin;
        font-family: @theme-heading-fonts;
        font-size: 1.35em;
        position: relative;
        padding-left: 36px;
        padding-right: 36px;
        color: @color-mid;
        vertical-align: top;

        .mixins > .inline-block;
        .mixins > .box-shadow(0, 0, 4px, rgba(0, 0, 0, 0.65));

        i.icon {
            width: 32px;
            height: 32px;
            background: url(sprites.png) no-repeat 0 (-@icon-start-y - 64px);
            position: absolute;
            left: 2px;
            top: 0;
        }

        i.caret {
            position: absolute;
            right: 6px;
            top: (@button-height - @caret-height) / 2 - 1;
        }

        @caret-height: 6px;
        @caret-sides: 6px;
        i.up {
            .mixins > .triangle-down(@caret-height, @caret-sides, @caret-sides, @color-theme);
        }     
        
        i.down {
            .mixins > .triangle-up(@caret-height, @caret-sides, @caret-sides, @color-theme);
        }
    }

    @icon-height: 32px;
    @icon-width: 32px;
    .toolbar {
        border: 1px solid @color-mid;
        background-color: #B3B3B3;
        height: 32px;
        padding: 0 6px;
        margin-left: @control-margin;

        .mixins > .inline-block;
        .mixins > .vertical-gradient(#FBFBFB, @button-top-stop, #B3B3B3, @button-bottom-stop);
        .mixins > .box-shadow(0, 0, 4px, rgba(0, 0, 0, 0.65));
        .mixins > .border-radius;

        li {
            height: @icon-height - 2;
            width: @icon-width;
            margin: 1px 0;

            .mixins > .inline-block;
            .aptra > .button;
            filter: none;
            background-image: none;
            background-color: transparent;
            border: 0;

            &.vdivider {
                .mixins > .vdivider(1px, @icon-height, 5px, @color-mid-light, white);
            }

            &.hdivider {
                .mixins > .hdivider(@icon-width, 1px, 5px, @color-mid-light, white);
            }

            &.vdivider:hover, &.hdivider:hover {
                background-image: none;
            }

            i {
                height: @icon-height;
                width: @icon-width;
                background: url(sprites.png) no-repeat;
            }

            .toolbar-icon(@index) {
                .mixins > .icon(-@icon-width * @index, -@icon-start-y, -@icon-width * @index, -@icon-start-y - @icon-height);
            }

            .new { .toolbar-icon(0); }
            .edit { .toolbar-icon(1); }
            .copy { .toolbar-icon(2); }
            .save { .toolbar-icon(3); }
            .cancel { .toolbar-icon(4); }
            .delete { .toolbar-icon(5); }
            .download { .toolbar-icon(6); }
            .upload { .toolbar-icon(7); }
            .print { .toolbar-icon(8); }
            .export { .toolbar-icon(9); }
            .command { .toolbar-icon(10); }
            .settings { .toolbar-icon(11); }
            .quick-commands { .toolbar-icon(12); }
            .search { .toolbar-icon(13); }
        }
    }

    .vertical-toolbar {
        display: block;
        position: absolute;
        height: auto;
        padding: 6px 2px;
        top: @header-height + @tab-height * 2 + @row-margin-bottom * 2 + @icon-height + 34px;
        right: @left-right-margin;
        width: @icon-width;

        .mixins > .horizontal-gradient(#FBFBFB, @button-top-stop, #B3B3B3, @button-bottom-stop);

        li {
            display: block;
        }
    }

    .container {
        @right: @left-right-margin + @icon-width + @control-margin * 2;

        position: absolute;
        top: @header-height + @tab-height * 2 + @row-margin-bottom * 2 + @icon-height + 34px;
        left: @left-right-margin;
        right: @right;
        margin: 0;
        min-height: 200px;
        min-width: @app-min-width - @right - @icon-width;

        .row-fluid {
            margin-bottom: @control-margin;
        }
    }
}

.module {
    border: 1px solid black;
    margin-bottom: @control-margin;

    .aptra > .panel-background;
    .mixins > .border-radius;
    .mixins > .box-shadow(0, 2px, 4px);

    &:last-child {
        margin-bottom: 0;
    }

    .titlebar {
        border-bottom: 1px solid black;
        height: 30px;
        position: relative;
        overflow: hidden;

        .mixins > .vertical-gradient(@color-nav-top, 10%, @color-nav-bottom, 90%);
        .mixins > .border-radius(@border-radius - 0.5, @border-radius - 0.5, 0, 0);

        @titlebar-button-width: 23px;
        .title {
            position: absolute;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            line-height: 30px;
            .aptra > .nav-title;
            font-weight: normal;
            top: 0;
            bottom: 0;
            left: @control-margin;
            right: @titlebar-button-width * 3 + @control-margin * 2;

            .mixins > .inline-block;
        }

        .buttons {
            position: absolute;
            top: 0.3em;
            right: @control-margin;

            button {
                position: relative;
                background: url(sprites.png) no-repeat;
                filter: none;
                border: 0;
                padding: 0;
                width: @titlebar-button-width;
                height: @titlebar-button-width;
                .mixins > .inline-block;
                .mixins > .button-sprite(horizontal, -78px, -@icon-start-y - 64px, 23px, 23px);

                i {
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    background: url(sprites.png) no-repeat;
                }

                i.settings {
                    background-position: -55px (-@icon-start-y - 87px);
                }

                i.min {
                    background-position: -55px (-@icon-start-y - 64px);
                }

                i.max {
                    background-position: -32px (-@icon-start-y - 87px);
                }

                i.close {
                    background-position: -32px (-@icon-start-y - 64px);
                }
            }
        }
    }

    .content {
        padding: @control-margin;
    }
}
